﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PMS.BLL
{
    public class Shelf
    {
        private readonly DAL.ShelfDAL shelfdal = new PMS.DAL.ShelfDAL();
        public bool IsExistByName(string name)
        {
            return shelfdal.IsExist(name);
        }
        public bool Insert(Model.Shelf shelf)
        {
            if (IsExistByName(shelf.ShelfName))
            {
                return false;
            }
            else
            {
                return shelfdal.Insert(shelf);
            }
        }
        public IList<Model.Shelf> GetAllList()
        {
            return shelfdal.GetList("");
        }
    }
}
